<!--
 * @Author: TKH
 * @Date: 2021-05-21 16:17:48
 * @LastEditTime: 2021-06-10 15:57:18
 * @Description: 资讯列表
 * @FilePath: \vant-v3\src\views\MaterList\Materlist.vue
-->
<template>
  <div class="zk-public-page">
    <van-nav-bar class="zk-public-nav" :title="title" left-arrow :fixed="true" :border="false" @click-left="onClickLeft" />
    <div class="zk-public-list list">
      <listItem :params="propParams"></listItem>
    </div>
  </div>
</template>

<script>
import { useRouter } from 'vue-router';
import list_item from '../../components/list_item.vue';
export default {
  name: 'Materlist',  
  data() {
    return {
      title: '资讯列表',
      propParams: {
        pathType: 'details',
        listData: [{
          id: 1,
          title: '标题标题标题标飒飒啊',
          releaseDate: '2021-05-23',
          author: '来源来源',
          previewImg: 'https://img01.yzcdn.cn/vant/cat.jpeg'
        }]
      }
    };
  },
  components: {
    listItem: list_item
  },
  setup() {
    /**
     * @router 引入路由
     * onClickLeft：返回
     */
    const router = useRouter();
    function onClickLeft() {
      router.back();
    };
    return {
      onClickLeft
    };
  }
};
</script>

<style scoped>
.list {
  margin-top: 45px;
}
</style>